import React from "react";
import { BackTop } from 'antd';
import { Link } from "react-router-dom";

export default class Menu extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
        };
    }

    render() {
        return (
            <>
                <div className="menu">
                    {
                        localStorage.getItem('role') === "2" && <div className="menu-item">
                            <Link to="/sellergroup">团队管理</Link>
                        </div>
                    }
                    {
                         localStorage.getItem('role') === "1" && <div className="menu-item">
                         <Link to="/seller">团队管理</Link>
                     </div>
                    }
                    <div className="menu-item">
                        <Link to="/">业绩统计</Link>
                    </div>
                    {
                        (localStorage.getItem('role') ==="1" || localStorage.getItem('role') ==="0") &&
                        <div className="menu-item">
                        <Link to="/myinfo">个人中心</Link>
                    </div>
                    }

                </div>
                <BackTop />
            </>
        )
    }
}
